<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of MY_Controller
 *
 * @author Administrator
 */
class Base_Controller extends CI_Controller {
    public $data;
    public $httpcode = [
        'errno' => 200,
        'error' => '连接成功'
    ];

    public function __construct() {
        parent::__construct();
        if(empty($this->session->id))
            redirect('user/login');
        $this->load->model('template_model');
        $this->load->model('member_model');
        $this->load->model('address_model');
        $this->load->model('log_model');
        $this->load->model('common_model');
        $this->data['userinfo'] = $this->session->userdata();
        $this->data['deparment'] = $this->config_model->getConfig('su_department');
        $this->data['webconfig'] = $this->config_model->getConfig('su_config');
        
        
        
    }
    
}
